package com.collect.zambia.zhiScene.zhiLogin.zhiFace.zhiLivenessUtil;

import android.app.Activity;
import android.graphics.Bitmap;

import com.collect.zambia.zhiUtils.SPUtils;

public class LivenessIntentUtil {

    public static final int REQUEST_CODE_FACE = 233;

    //判断曾经调起失败flag
    public static final String LIVENESS_EXCEPTION_FLAG = "LIVE_EXC_FLAG";

    public LivenessIntentUtil() {
        this.isLivenessRandom = true;


    }

    public static LivenessIntentUtil getInstance() {
        return instance;
    }

    private static final LivenessIntentUtil instance = new LivenessIntentUtil();

    //动作列表

    //是否随机动作
    public boolean isLivenessRandom = true;

    //是否初始化成功
    private boolean hasGotToken = false;

    //是否检测成功
    public boolean isDetectSuccess = false;
    //检测成功为空字串，失败则是原因说明
    public String detectMsg = "";
    //如果检测成功，保存最佳图片的本地路径
    public String detectFilePath = "";
    //如果检测成功，保存最佳图片的bitmap
    public Bitmap detectFileImage = null;

    /**
     * 设置调起ocr异常标志
     *
     * @type method
     * @author liwenjie
     * @creatTime 2020/8/5 11:00
     */
    public static void setLivenessRunException() {
        SPUtils.getInstance().put(LIVENESS_EXCEPTION_FLAG, "YES");
    }

    /**
     * 设置sdk配置参数
     *
     * @type method
     * @author liwenjie
     * @creatTime 2020/8/10 15:59
     */
    public void setFaceConfig() {

    }

    public boolean checkTokenStatus() {
        return hasGotToken;
    }

    /**
     * 初始化SDK
     */
    public void startFaceRecog(final Activity activity, final int reqCode) {

    }

    public void openFaceRecogUI(Activity activity, int reqCode) {

    }
}
